#ifndef  _DEVDATAMGR_H_
#define _DEVDATAMGR_H_

#include <vector>

#include "DataLister.h"
#include "Package.h"

class DevDataMgr
{
public:
	~DevDataMgr();

	static DevDataMgr* getIt();

	bool init(char* buffer, unsigned char& packageType);

	Package* getPackage();

	void registerListener(DataLister* s);

	void removeListener(DataLister* s);

	void notify();

	void setValue(Package* package, unsigned char* devId);

private:
	DevDataMgr();

private:
	static DevDataMgr* m_head;
	Package* m_package;

	std::vector<DataLister*>listenList;
	DataLister* s;
	
	unsigned char m_devId[32];
};

#endif // ! _DEVDATAMGR_H_
